﻿//Copyright (C) <2013>  <jonathan cleeve norton> All Rights Reserved 
//Contact jon.norton@fin-plus.co.uk website <http://www.fin-plus.co.uk/>
using System;
using System.Text;
using System.Reflection;
using System.Linq;
using System.Xml.Linq;
using System.Text.RegularExpressions;
using System.Threading;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Collections.Concurrent;
using System.Runtime.Serialization;
using System.Xml;

namespace FinPlusCommon
{
    public interface IFinPlusItem 
    {
        int Index { get; set; }
        int Id { get; set; }
        string Name { get; set; }
        string Value { get; set; }
        string Type { get; set; }
        DateTime TimeStamp { get; set; }
        DateTime Closed { get; set; }
        string User { get; set; }
        string Display { get; set; }
        object Object { get; }
        event PropertyChangedEventHandler PropertyChanged;

        void Refresh();

        IFinPlusItem Clone(int id);

        void Set(object value, string user = null, bool notify = true);

        void Set(object value, DateTime timeStamp, string user = null, bool notify = true);

        string Key(string key = null);

        void Evaluate(IFinPlusFunction func, string expression);

        void Total(IList<IFinPlusItem> items);

        XmlNode ToXmlNode(XmlDocument xmlDoc);
    }
}
